home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / uwpc201.zip / UW-SRC.ZIP / UWFTP.DOC < prev    next >
Text File  |  1991-05-08  |  5KB  |  81 lines

  1.                 Documentation for the UWFTP Protocol
  2.                 ------------------------------------
  3.                                 by Rhys Weatherley, 1991.
  4.  
  5. 1. INTRODUCTION
  6.  
  7. This document describes the protocol used for transmission of files between
  8. the UW/PC communications program (version 2.00 and higher) and UNIX hosts.
  9. The main "brains" of the protocol is in the UW/PC client program, putting as
  10. little burden as possible on the UNIX-based UWFTP server, both in terms of
  11. program complexity and machine load.
  12.  
  13. 2. PROTOCOL STARTUP
  14.  
  15. When the server is run by the user on the UNIX host, it will send the character
  16. sequence CTRL-A followed by '>' followed by 'F'.  This will instruct UW/PC
  17. to begin a UWFTP session in the window the UWFTP server is executed within (or
  18. Protocol 0 if the UW server is not running).  If the UWFTP server does not
  19. receive a reply from UW/PC within one second it will send the sequence again,
  20. and will continue to retry at one-second intervals.  It will stop trying
  21. either when it receives a CTRL-X character (cancel) or the letter captial 'A'.
  22. If the transfer is cancelled, the server will exit, otherwise it will send a
  23. message of the form:
  24.  
  25.         "HHHHH  UWFTP server <host-name> started on <date>"
  26.  
  27. The five 'H' characters are present to provide some redundancy for error
  28. correction purposes.  The message above is followed by a line-feed character,
  29. optionally preceded by a carriage return character.  All characters except
  30. for the initial 'H' characters and spaces are displayed by UW/PC as a welcome
  31. message for the server.  No interpretation is placed on them.  Unlike the
  32. Internet FTP program, UW/PC doesn't ask for the user's password because the
  33. UWFTP server can only be run once the user has logged in, and so asking for
  34. a password is redundant.
  35.  
  36. If the UWFTP server receives a CTRL-X character at any time then it will send
  37. a number of line-feeds (and carriage returns) and then five 'X' characters
  38. separated and followed by some more line-feeds and carriage returns.  The
  39. server will then exit.
  40.  
  41. 3. PACKET FORMAT
  42.  
  43. This section describes the packet format that is used to transmit information
  44. between UW/PC and the UWFTP server running on the UNIX host.  Packets are
  45. delimited by one or more line-feed or carriage return characters (or any
  46. combination).  Each packet begins with the packet number and type, the
  47. encoded packet length (excluding the header information) and a two-byte
  48. checksum value.  The maximum packet size is 94 characters, excluding the
  49. header information.  The character encoding used is similar to that used by
  50. the Kermit protocol, but is not fully compatibile with Kermit.  The following
  51. characters describe the packet types that can get send between the machines:
  52.  
  53.         R - Specifies a filename to be retrieved from the UNIX host.
  54.             The host will send a 'B' type packet in response to the
  55.             correct reception of this packet type.
  56.         S - Specifies a filename to be opened to place data sent from
  57.             to the UW/PC client into.  After acknowledgement, the client
  58.             will send a 'B' type packet.
  59.         B - Beginning of file transfer.  The server or client has begun
  60.             a file transfer.  The next highest received packet number
  61.             from the client or server is the first 'D' type data packet
  62.             for the current transfer file.
  63.         D - Data packet.  All of the bytes following the packet header
  64.             are considered raw data to be placed in the output file.  All
  65.             transformation between ASCII and BINARY data is done by UW/PC.
  66.             Data packets will be re-sent at five-second intervals until
  67.             acknowledgements are received.
  68.         E - End of data packet.  This is sent by the server or client when
  69.             all data packets have been transferred.  The packet will be
  70.             re-sent at one-second intervals until an acknowledgement is
  71.             received.
  72.         K - Acknowledgement packet.  The data portion of the packet specifies
  73.             the packet number being acknowledged.  The packet will be re-sent
  74.             at one-second intervals until the next incoming packet is detected.
  75.         C - Specifies a UNIX command to be run on the host machine with an
  76.             empty standard input file and all standard output and standard
  77.             error output is to be transmitted back to the UW/PC client using
  78.             the data packets described above.  After acknowledgement, the
  79.             host will send a 'B' packet and will start sending the accumulated
  80.             output from the UNIX command.
  81.